package com.sfac.test.entity;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sfac.common.entity.AbstractEntity;
import lombok.Data;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;


@Data
@Entity
@Table(name = "test_card")
public class Card extends AbstractEntity {
    private String cardNum;

    @OneToOne(mappedBy = "studentCard",cascade = CascadeType.ALL)
    @JsonIgnore
    private Student student;

}
